package org.example.design.decorator.itf.impl;

import org.example.design.decorator.itf.HandlerInterceptor;

/**
 * @Classname SsoInterceptor
 * @Description 模拟原生单点登录
 * @Date 2020/11/5 9:43 上午
 * @Created by xiangjd
 */
public class SsoInterceptor implements HandlerInterceptor {
    @Override
    public boolean prehandle(String requset, String response, Object handle) {
        // 模拟获取cookie
        String ticket = requset.substring(1,8);
        //模拟检验
        return ticket.equals("success");
    }
}
